package com.dimong.www.loan.widget;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.ViewGroup;
import android.widget.TextView;

import com.dimong.loan.sdk.ui.adapter.BaseRecyclerAdapter;
import com.dimong.loan.sdk.ui.adapter.BaseRecyclerViewHolder;
import com.dimong.www.loan.R;

public class LoanSelectAdapter extends BaseRecyclerAdapter<String> {
    private Context mContext;

    public LoanSelectAdapter(Context context) {
        mContext = context;
    }

    @Override
    public RecyclerView.ViewHolder viewHolderCreate(ViewGroup parent, int viewType) {
        return new LoanSelectPpwHolder(mContext, parent);
    }

    @Override
    public void viewHolderBind(RecyclerView.ViewHolder holder, int position) {
        LoanSelectPpwHolder loanSelectPpwHolder = (LoanSelectPpwHolder) holder;
        loanSelectPpwHolder.tv_item_loan_select_ppw.setText(getItem(position));

    }

    public class LoanSelectPpwHolder extends BaseRecyclerViewHolder {
        private TextView tv_item_loan_select_ppw;
        public LoanSelectPpwHolder(Context context, ViewGroup parent) {
            super(context, R.layout.item_loan_select_ppw, parent);
            tv_item_loan_select_ppw = findViewById(R.id.tv_item_loan_select_ppw);
        }
    }
}
